package com.cxy.user.controller;

import com.cxy.user.domain.entity.User;
import com.cxy.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/users/{id}")
    public User findById(@PathVariable Integer id){
        return this.userService.findById(id);
    }
}
